<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
 ${user.uname}，成功登录
	
	<c:choose>
		<c:when test="${empty list }">
			没有数据		
		</c:when>
		<c:otherwise>
		<table border="1px">
		<tr> 
		<th>用户名</th>
		<th>操作</th>
		</tr>
		
			<c:forEach items="${list }" var="l">
					<tr> 
					<td>${l.uname } </td> 
					<td><a href="UserManagerServlet?flag=del&id=${l.u_id}">删除</a></td>
					<td><a href="UserManagerServlet?flag=upda&id=${l.u_id}">修改</a></td> 
					</tr>
			
			</c:forEach>
		
			</table>
					<form action="UserManagerServlet?flag1=upda1" method="post">
					       <input type="hidden" name="uid" value="${use.u_id }">
			请输入修改后的用户名：<input type="text" name="name" value="${use.uname }">
			请输入修改后的密码：<input type="password" name="pass" value="${use.upass }">
				<input type="submit" value="提交">
			</form>
			<form action="UserManagerServlet?flag=add" method="post">
			請輸入用戶名：<input type="text" name="username">
			密码：<input type="password" name="password"><br/>
			<input type="submit" value="新增">
			</form>
			
			<p>
				<a href="MainServlet?pageIndex=1">首页</a>
				<a href="MainServlet?pageIndex=${pageIndex-1}">上一页</a>
				<a href="MainServlet?pageIndex=${pageIndex+1}">下一页</a>
				<a href="MainServlet?pageIndex=${totalPage }">尾页</a>
			</p>
			
		</c:otherwise>		
	</c:choose>
	
</body>
</html>
 
 
</body>
</html>